package com.youi.shop.pojo.qo.address;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @version 1.0
 * @Author: xxf
 * @CreateDate: 2020/11/9 20:53
 */
@Data
@ApiModel("添加地址信息")
public class AddressQO {

    @ApiModelProperty(value = "地址主键")
    private Long addressId;

    @ApiModelProperty(value = "会员表主键")
    private Long memberId;

    @ApiModelProperty(value = "商家用户主键")
    private Long userId;

    @ApiModelProperty(value = "地址名称")
    private String addressName;

    @ApiModelProperty(value = "默认发货地址：0->否；1->是")
    private Integer sendStatus;

    @ApiModelProperty(value = "是否默认收货地址：0->否；1->是")
    private Integer receiveStatus;

    @ApiModelProperty(value = "联系人姓名")
    @NotBlank(message = "联系人姓名不能为空")
    private String contact;

    @ApiModelProperty(value = "联系人电话")
    @Pattern(regexp = "^((13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$",message = "手机号格式有误")
    private String phone;

    @ApiModelProperty(value = "省份")
    private String province;

    @ApiModelProperty(value = "城市")
    private String city;

    @ApiModelProperty(value = "区")
    private String district;

    @ApiModelProperty(value = "详细地址")
    private String addressDetail;



}
